Optimal. Leaf size=35 \[ \frac{2 a^2 \log (1-\cos (c+d x))}{d}-\frac{a^2 \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0404139, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3879, 72} \[ \frac{2 a^2 \log (1-\cos (c+d x))}{d}-\frac{a^2 \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3879
Rule 72
Rubi steps
\begin{align*} \int \cot (c+d x) (a+a \sec (c+d x))^2 \, dx &=-\frac{a^2 \operatorname{Subst}\left (\int \frac{a+a x}{x (a-a x)} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac{a^2 \operatorname{Subst}\left (\int \left (-\frac{2}{-1+x}+\frac{1}{x}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac{2 a^2 \log (1-\cos (c+d x))}{d}-\frac{a^2 \log (\cos (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.0378019, size = 29, normalized size = 0.83 \[ -\frac{a^2 \left (\log (\cos (c+d x))-4 \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.05, size = 34, normalized size = 1. \begin{align*} 2\,{\frac{{a}^{2}\ln \left ( -1+\sec \left ( dx+c \right ) \right ) }{d}}-{\frac{{a}^{2}\ln \left ( \sec \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.11702, size = 42, normalized size = 1.2 \begin{align*} \frac{2 \, a^{2} \log \left (\cos \left (d x + c\right ) - 1\right ) - a^{2} \log \left (\cos \left (d x + c\right )\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.03161, size = 89, normalized size = 2.54 \begin{align*} -\frac{a^{2} \log \left (-\cos \left (d x + c\right )\right ) - 2 \, a^{2} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} a^{2} \left (\int 2 \cot{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx + \int \cot{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cot{\left (c + d x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.46376, size = 86, normalized size = 2.46 \begin{align*} \frac{2 \, a^{2} \log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - a^{2} \log \left ({\left | \frac{{\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1 \right |}\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]